@extends('admin.layouts.app')
@section('content')

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="page-title">平台管理</h4>
                                <ol class="breadcrumb">
                                    <li><a href="#">系统</a></li>
                                    <li><a href="{{url('zadmin/admin')}}">管理员</a></li>
                                    <li class="active">修改密码</li>
                                </ol>
                            </div>
                        </div>
                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                            <h2 class="m-t-0 header-title">添加商户</h2>
                            <small>注意：店铺老板第一次登录需要使用下面的电话和验证码</small>
                            <hr/>
                             
    @include('admin.common.error')
    <div class="row">
			 <div class="col-md-6">
        <form class="form-horizontal" role="form" action="{{url('zadmin/shop/save')}}" method="post" enctype="multipart/form-data">
          <div class="form-group">
          <label class="col-md-2 control-label">商户名</label>
          <div class="col-md-10">
          <input type="text" class="form-control" name="name" required="" value="{{old('name')}}"  autocomplete="off">
                                                  </div>
                                              </div>
              <div class="form-group">
              <label class="col-md-2 control-label" for="example-email">联系人</label>
                <div class="col-md-10">
                  <input type="text"  name="contacter" class="form-control" value="{{old('contacter')}}" placeholder="" autocomplete="off" >
                </div>
              </div>

            <div class="form-group">
              <label class="col-md-2 control-label" for="example-email">电话</label>
                <div class="col-md-10">
                <input type="text"  name="phone" class="form-control" value="{{old('phone')}}" placeholder="" required=""  autocomplete="off" />
              </div>
            </div>

             

                <div class="form-group">
                  <label class="col-md-2 control-label">LOGO</label>
                <div class="col-md-10">
                <input type="file" class="form-control" name="logo" required="" value="" autocomplete="off" />
                </div>
                </div>

             <div class="form-group">
              <label class="col-md-2 control-label" for="example-email">店铺公告</label>
                <div class="col-md-10">
                <textarea name="notie" class="form-control"></textarea>
              </div>
            </div>   

                <div class="form-group">
              <label class="col-md-2 control-label" for="example-email">验证码</label>
                <div class="col-md-10">
                <input type="text"  name="license" class="form-control" value="" placeholder="商户第一次登录使用，例如：8877" required="" autocomplete="off"/>
              </div>
            </div>

             <div class="form-group">
              <label class="col-md-2 control-label" for="example-email">最底起送额度</label>
                <div class="col-md-10">
                <input type="text"  name="min_orderamount" class="form-control" value="" placeholder="" autocomplete="off"/>
              </div>
            </div>

            <div class="form-group">
              <label class="col-md-2 control-label" for="example-email">经纬度</label>
                <div class="col-md-10">
                <input type="text"  name="lnglat" class="form-control" value="" id="lnglat" placeholder="坐标从地图中选择" autocomplete="off"/>
              </div>
            </div>


                <div class="form-group text-center">
                  <button type="submit" class="btn btn-info waves-effect waves-light">保存</button>
                </div>
                                              
                                              
                             {{csrf_field()}}
              </form>
            </div>
          <div class="col-md-6">
            <div id="container" style="height: 300px;"></div>
          </div> 
			                        	
			                        </div>

                             
			                        
                        			
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection
                        
                        
                        

                  
        
       

           



    
        @section('js')
<script>


function init() {
  //设置地图中心点
 
 
 
  
  //定义工厂模式函数
  var myOptions = {
    zoom: 12,               //设置地图缩放级别
    
    mapTypeId: qq.maps.MapTypeId.ROADMAP  //设置地图样式详情参见MapType
  }
  //获取dom元素添加地图信息
  var map = new qq.maps.Map(document.getElementById("container"), myOptions);

  qq.maps.event.addListener(map, 'click', function(event) {
     
        $('#lnglat').val(event.latLng.getLng() + ',' +
        event.latLng.getLat());
  });
}
  //异步加载地图库函数文件
function loadScript() {
  //创建script标签
  var script = document.createElement("script");
  //设置标签的type属性
  script.type = "text/javascript";
  //设置标签的链接地址
  script.src = "https://map.qq.com/api/js?v=2.exp&key=HDSBZ-JOW3F-NNNJA-JAJKK-KJNQV-P2F6X&callback=init";
  //添加标签到dom
  document.body.appendChild(script);
}
  
window.onload = loadScript;    // dom文档加载结束开始加载 此段代码
</script>
        
        @endsection
    
